package com.settlement.system.controller;

import com.settlement.system.common.result.Result;
import com.settlement.system.model.query.FinanceReportQuery;
import com.settlement.system.model.vo.FinanceReportVo;
import com.settlement.system.service.FinanceReportService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 资金日报 控制类
 */
@Tag(name = "资金日报")
@RestController
@RequestMapping("/api/v1/financeReport")
@RequiredArgsConstructor
public class FinanceReportController {

    private final FinanceReportService financeReportService;

    @GetMapping("/list")
    public Result<List<FinanceReportVo>> getPage(@ParameterObject FinanceReportQuery queryParams) {
        List<FinanceReportVo> result = financeReportService.listFinanceReport(queryParams);
        return Result.success(result);
    }
}
